﻿<controls:ChildWindow x:Class="LEEAAttendanceControl.Views.ExceptionEdit"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="400" Height="420">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Grid Grid.Row="0" Margin="10" HorizontalAlignment="Center" DataContext="{Binding}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            
            <sdk:Label x:Name="NameLabel" Content="Exception Name:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left"
                       VerticalAlignment="Center" Margin="3"/>
            
            <TextBox x:Name="NameBox" Width="150" Margin="3" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left"
                       Text="{Binding Name, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"/>
            
            <sdk:Label x:Name="CompanyLabel" Content="Company:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left"
                       VerticalAlignment="Center" Margin="3"/>
            
            <ComboBox x:Name="CompanyCombo" Width="150" Grid.Column="1" Grid.Row="1" Margin="3" Height="25"
                      SelectedValuePath="ID" DisplayMemberPath="CompanyName" HorizontalAlignment="Left"
                      SelectedValue="{Binding CompanyID, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"/>
            
            <sdk:Label x:Name="HoursLabel" Content="Daily Paid Hours:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left"
                       VerticalAlignment="Center" Margin="3"/>

            <TextBox x:Name="DPHBox" Width="150" Margin="3"  Grid.Column="1" Grid.Row="2"  HorizontalAlignment="Left"
                       Text="{Binding DPH, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"/>

          
            <sdk:Label x:Name="ColorLabel" Content="Color:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left"
                       VerticalAlignment="Center" Margin="3"/>
            
            <TextBox x:Name="ColorBox" Width="150" Grid.Column="1" Grid.Row="3" Margin="3" HorizontalAlignment="Left"
                     Text="{Binding Color, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"/>
            
            <sdk:Label x:Name="DescriptionLabel" Content="Description:" Grid.Column="0" Grid.Row="4" Margin="3"
                       HorizontalAlignment="Left" VerticalAlignment="Center"/>
            
            <TextBox x:Name="DescriptionBox" Width="200" Grid.Column="1" Grid.Row="4" Margin="3" AcceptsReturn="True"
                     Height="70" VerticalScrollBarVisibility="Auto"
                     Text="{Binding Description, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"/>
        </Grid>
        
        <Button x:Name="SaveButton" Content="Save" Grid.Row="1" Height="25" Width="60" Margin="290,0,27,0"
                Click="SaveButton_Click"/>
        
        <sdk:ValidationSummary x:Name="ErrorSummary" Grid.Row="2" Margin="0,16,0,0" Height="120"/>
    </Grid>
</controls:ChildWindow>